﻿using System;

namespace XBMCRemote.DataModel
{
    /// <summary>
    /// Event arguments with a generic payload. Payload is accessible through the Data property.
    /// </summary>
    /// <typeparam name="T">The type for the <see cref="Data"/> member.</typeparam>
    public class EventArgs<T> : EventArgs
    {
        /// <summary>
        /// Default constructor, Set payload via <see cref="Data"/> property.
        /// </summary>
        public EventArgs()
        {
        }

        /// <summary>
        /// Constructor to set the payload.
        /// </summary>
        /// <param name="data">The data to set.</param>
        public EventArgs(T data)
        {
            Data = data;
        }

        /// <summary>
        /// Gets or sets the data in this EventArgs instance.
        /// </summary>
        /// <value>The data.</value>
        public T Data { get; set; }
    }
}
